home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 2000 October / Software of the Month - Ultimate Collection Shareware 277.iso / pc / PROGRAMS / UTILITY / WINLINUX / DATA1.CAB / programs_-_include / NET / IRDA / DISCOVER.{17 < prev    next >
Text File  |  1999-09-17  |  2KB  |  66 lines

  1. /*********************************************************************
  2.  *                
  3.  * Filename:      discovery.h
  4.  * Version:       
  5.  * Description:   
  6.  * Status:        Experimental.
  7.  * Author:        Dag Brattli <dagb@cs.uit.no>
  8.  * Created at:    Tue Apr  6 16:53:53 1999
  9.  * Modified at:   Tue Apr  6 20:44:35 1999
  10.  * Modified by:   Dag Brattli <dagb@cs.uit.no>
  11.  * 
  12.  *     Copyright (c) 1999 Dag Brattli, All Rights Reserved.
  13.  *     
  14.  *     This program is free software; you can redistribute it and/or 
  15.  *     modify it under the terms of the GNU General Public License as 
  16.  *     published by the Free Software Foundation; either version 2 of 
  17.  *     the License, or (at your option) any later version.
  18.  * 
  19.  *     This program is distributed in the hope that it will be useful,
  20.  *     but WITHOUT ANY WARRANTY; without even the implied warranty of
  21.  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  22.  *     GNU General Public License for more details.
  23.  * 
  24.  *     You should have received a copy of the GNU General Public License 
  25.  *     along with this program; if not, write to the Free Software 
  26.  *     Foundation, Inc., 59 Temple Place, Suite 330, Boston, 
  27.  *     MA 02111-1307 USA
  28.  *     
  29.  ********************************************************************/
  30.  
  31. #ifndef DISCOVERY_H
  32. #define DISCOVERY_H
  33.  
  34. #include <asm/param.h>
  35.  
  36. #include <net/irda/irda.h>
  37. #include <net/irda/irqueue.h>
  38.  
  39. #define DISCOVERY_EXPIRE_TIMEOUT 6*HZ
  40.  
  41. /*
  42.  * The DISCOVERY structure is used for both discovery requests and responses
  43.  */
  44. typedef struct {
  45.     QUEUE queue;             /* Must be first! */
  46.  
  47.     __u32      saddr;        /* Which link the device was discovered */
  48.     __u32      daddr;        /* Remote device address */
  49.     LAP_REASON condition;    /* More info about the discovery */
  50.  
  51.     __u16_host_order hints;  /* Discovery hint bits */
  52.     __u8       charset;
  53.     char       info[32];     /* Usually the name of the device */
  54.     __u8       info_len;     /* Length of device info field */
  55.  
  56.     int        gen_addr_bit; /* Need to generate a new device address? */
  57.     int        nslots;       /* Number of slots to use when discovering */
  58.     int        timestamp;    /* Time discovered */
  59. } discovery_t;
  60.  
  61. void irlmp_add_discovery(hashbin_t *cachelog, discovery_t *discovery);
  62. void irlmp_add_discovery_log(hashbin_t *cachelog, hashbin_t *log);
  63. void irlmp_expire_discoveries(hashbin_t *log, int saddr, int force);
  64.  
  65. #endif
  66.